<!-- templates/auto_reply.html -->
{% extends "base.html" %}
{% block content %}
/**
 * Heading for the auto reply section of the web application.
 * This heading indicates that the auto reply functionality is currently not available.
 */
<h2>自动回复(不可用)</h2>
<form method="post" class="mb-4">
    <div class="form-group">
        <label for="keyword">Keyword</label>
        <input type="text" id="keyword" name="keyword" class="form-control" required>
    </div>
    <div class="form-group">
        <label for="reply_type">Reply Type</label>
        <select id="reply_type" name="reply_type" class="form-control" required>
            <option value="text">Text</option>
            <option value="image">Image</option>
        </select>
    </div>
    <div class="form-group">
        <label for="content">Content</label>
        <textarea id="content" name="content" class="form-control" required></textarea>
    </div>
    <button type="submit" class="btn btn-primary">Add Auto Reply</button>
</form>
<table class="table table-striped">
    <thead>
        <tr>
            <th>Keyword</th>
            <th>Type</th>
            <th>Content</th>
            <th>Action</th>
        </tr>
    </thead>
    <tbody>
        {% for auto_reply in auto_replies %}
        <tr>
            <td>{{ auto_reply.keyword }}</td>
            <td>{{ auto_reply.reply_type }}</td>
            <td>{{ auto_reply.content }}</td>
            <td>
                <button class="btn btn-secondary">Edit</button>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}
